Skip to content

fix(devkit): add required registry url and schema location to local-simple-bap - #484

Open
skdas20 wants to merge 1 commit into
beckn:mainfrom
skdas20:fix-418-local-simple-bap-config
Open

fix(devkit): add required registry url and schema location to local-simple-bap#484
skdas20 wants to merge 1 commit into
beckn:mainfrom
skdas20:fix-418-local-simple-bap-config

Conversation

@skdas20

@skdas20 skdas20 commented Aug 7, 2026

Copy link
Copy Markdown

Fixes #418.

Why the node fails

Both plugins read values from config that this template does not set:

  • schemav2validator/cmd/plugin.go returns errors.New("location not configured") when location is absent — the validator never initialises.
  • dediregistry/cmd/plugin.go reads config["url"] with no fallback.

So a node started from local-simple-bap.yaml fails at the validateSign / validateSchema steps rather than coming up, which matches the reported symptom.

Values

Rather than take the URLs from the issue verbatim, I matched devkits/p2p-trading-ies-wave1/config/local-p2p-bap.yaml, a working config in this repo that sets all three:

Key Value
registry.url https://fabric.nfh.global/registry/dedi
schemaValidator.type url
schemaValidator.location …/protocol-specifications-v2/tags/core-2.0.0-rc-eos-release/api/beckn.yaml

One deliberate difference from the issue: it proposed the schema at …/main/api/v2.0.0/beckn.yaml. Both that and the pinned tag return 200, but I used the pinned tag because that is what the working config uses and a main ref would drift when upstream moves. Happy to switch if you'd rather track main.

I also left allowedNetworkIDs untouched — the issue proposed adding winroom-ies-data-exchange, but the file has since changed and already carries test-ies-data-sharing-network, so that part appears to have been addressed separately.

Applied to both the bapTxnReceiver and bapTxnCaller modules. YAML validated.

One thing worth flagging

No other devkit config sets these keys either — I checked all of them, and registry.url, schemaValidator.type and schemaValidator.location are absent everywhere except local-p2p-bap.yaml. So the other templates likely fail the same way. I kept this PR to the file named in the issue rather than changing configs I haven't been able to run, but it's probably worth a follow-up if you confirm the others are meant to be runnable as-is.

…imple-bap

The dediregistry and schemav2validator plugins both read required values
from config that this template did not set, so a node started from it fails
during validateSign/validateSchema instead of coming up.

schemav2validator/cmd/plugin.go returns 'location not configured' when the
key is absent, and dediregistry/cmd/plugin.go reads config["url"] with no
fallback.

Values match the working local-p2p-bap.yaml in the same repo, including its
pinned schema tag rather than a moving main ref. Applied to both the
bapTxnReceiver and bapTxnCaller modules.

Fixes beckn#418

Signed-off-by: skdas20 <skdas5405@gmail.com>
@skdas20

skdas20 commented Aug 13, 2026

Copy link
Copy Markdown
Author

Correction to my own PR description — I overstated the mechanism and want to fix that on the record before anyone reviews it.

I wrote that schemav2validator/cmd/plugin.go returns location not configured when location is absent. Re-reading it, that's not what the code does:

// Primary spec is optional — a non-Beckn deployment may rely solely on auxiliary specs.
if typeVal != "" && locVal == "" {
    return nil, nil, errors.New("location not configured")
}

It only errors when type is set without location (or vice versa). With both absent — which is what this template had — the plugin initialises fine and treats the primary spec as optional, exactly as the comment says. Likewise dediregistry reads config["url"] into an empty string rather than rejecting it, so a missing url fails later at request time rather than at startup.

So the diff still matches the working local-p2p-bap.yaml and still gives the template a primary spec and a registry URL, but my framing of why it was failing was wrong. The reporter in #418 hit a real failure; I can't claim from the plugin code alone that a missing location alone caused it, and I haven't run the container to find out.

Treat this as "align the template with the working one" rather than "fix a hard startup error", and please weigh it accordingly — I'd rather flag that myself than have it found in review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix missing registry URL, schema location, and testnet IDs in local-simple-bap.yaml

1 participant